package com.np.control1;

import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        ActivityResultLauncher<Intent> launcher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback<ActivityResult>() {
            @Override
            public void onActivityResult(ActivityResult result) {

            }
        });

        findViewById(R.id.button_01).setOnClickListener(v -> launcher.launch(new Intent(this, BasicActivity.class)));
        findViewById(R.id.button_02).setOnClickListener(v -> launcher.launch(new Intent(this, MainActivity2.class)));
        findViewById(R.id.button_03).setOnClickListener(v -> launcher.launch(new Intent(this, MainActivity3.class)));
        findViewById(R.id.button_04).setOnClickListener(v -> launcher.launch(new Intent(this, MainActivity4.class)));
        findViewById(R.id.button_05).setOnClickListener(v -> launcher.launch(new Intent(this, MainActivity5.class)));
        findViewById(R.id.button_06).setOnClickListener(v -> launcher.launch(new Intent(this, MainActivity6.class)));
    }
}